const Router = require('koa-router')
const {avatarHandler,pictureHandler,pictureResize} = require('../middleware/file.middleware')
const {verifyAuth} = require('../middleware/anth.middleware')
const {createAvatar,savePictureInfo} = require('../controller/file.controller')
const fileRouter = new Router({prefix: '/upload'})
fileRouter.post('/avatar', verifyAuth, avatarHandler, createAvatar)
fileRouter.post('/picture', verifyAuth, pictureHandler, pictureResize,savePictureInfo)
module.exports = fileRouter
